package com.authine.cloudpivot.ext.domain.query;

import com.alibaba.fastjson.annotation.JSONField;
import com.authine.cloudpivot.ext.utils.ObjToCollection;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "供应商商品物料查询")
public class GoodsQuery {
    @ApiModelProperty(value = "商品id集合", dataType = "List<Long>")
    List<Long> GoodsIds;
    @ApiModelProperty(value = "客户商品id集合", dataType = "List<String>")
    @JSONField(deserializeUsing = ObjToCollection.class)
    List<String> clientGoodsIds;
    @ApiModelProperty(value = "商品名称")
    private String filterName;
    @ApiModelProperty(value = "商品品牌")
    private String brand;
    @ApiModelProperty(value = "商品型号")
    private String model;
    @ApiModelProperty(value = "商品规格")
    private String spec;
    @ApiModelProperty(value = "最小起订量")
    private Integer minOrder;
    @ApiModelProperty(value = "有效期", example = "2020-12-20 00:00:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expiry;
    @ApiModelProperty(value = "创建时间起", example = "2019-12-20 00:00:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    @ApiModelProperty(value = "创建时间止", example = "2020-12-20 00:00:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    @ApiModelProperty(value = "商品id")
    private Long goodsId;
    @ApiModelProperty(value = "客户商品id")
    private String clientGoodsId;
    @ApiModelProperty(hidden = true)
    private String orgFullName;
}
